#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
int main()
{
  FILE *fp;
  fp = fopen("f1.txt", "w");
  if (fp == NULL)
  {
    cout << "can't open f1.txt" << endl;
    exit(1);
  }
  char s[100], t[100], a[100];
  char *p1, *p2;
  gets(s);
  int i, n;
  for (n = 0; s[n] != '\0'; n++);
  for (i = 0; i < n; i++)
  {
    t[n - 1 - i] = s[i];
  }
  t[n] = '\0';
  fputs(t, fp);
  fputs(s, fp);
  
  fclose(fp);
  fp = fopen("f1.txt", "r");
  if (fp == NULL)
  {
    cout << "can't open f1.txt" << endl;
    exit(1);
  }
  fgets(a, n * 2 + 1, fp);
  puts(a);
  fclose(fp);
  system("pause");
  return 0;
}